package org.lyg.shiro.service.impl;

import org.lyg.dao.IRoleMapper;
import org.lyg.shiro.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("roleService")
public class RoleServiceImpl implements IRoleService {
    @Autowired
    IRoleMapper roleMapper;

    @Override
    public List<String> findRolesByUserId(int id) {
        List<String> roles = roleMapper.findRolesByUserId(id);
        return roles;
    }
}
